<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  class Animal {
    constructor(name) {
      this.name = name;
    }

    sayName() {
      console.log('my name is :' + this.name);
    }
  }

  class Cat extends Animal {
    constructor(name, age) {
      super(name);
      this.age = age;
    }
    sayName2(){
      console.log(this.age);
    }
  }

  let cat = new Animal('4555555555');
  let cat2 = new Cat('llll', 12);
  console.log(cat.name);
  cat.sayName()
  console.log(cat2.name);
  console.log(cat2.age);
  cat2.sayName();
  cat2.sayName2()
</script>
</body>
</html>